﻿using System;
using System.Collections.Generic;
using NHibernate.Criterion;
using SimpleServiceBus.Persistence.Domain.Management.Entities;
using SimpleServiceBus.Persistence.Domain.Management.Repositories;

namespace SimpleServiceBus.Persistence.NHibernate.Repositories
{
    public class ManagedEndpointRepository : Repository<ManagedEndpoint>, IManagedEndpointRepository
    {
        public ManagedEndpoint GetByEndpointId(string endpointId)
        {
            return FindOne(Expression.Eq("EndpointID", endpointId));

        }

        public IList<ManagedEndpoint> FindAll()
        {
            return base.FindAll(new ICriterion[0]);
        }
    }
}
